package day15.ZiXi;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class MyThreadPoolDemo2 {
    public static void main(String[] args) {
        ExecutorService ee = Executors.newFixedThreadPool(10);
        ThreadPoolExecutor pool = (ThreadPoolExecutor) ee;
        System.out.println(pool.getPoolSize());
        ee.submit(()->{
            System.out.println(Thread.currentThread().getName()+"在执行了");
        });
        ee.submit(()->{
            System.out.println(Thread.currentThread().getName()+"在执行了");
        });
        System.out.println(pool.getPoolSize());
    }
}
